﻿using System.Diagnostics;

namespace DimensionsHelper.LanguageService.Syntax;

public class MetadataOther : MetadataFieldReferenceSuffix
{
    internal MetadataOther(SyntaxToken otherKeywordToken, SyntaxNode? parent) :
        base(SyntaxKinds.MetadataOther,
            otherKeywordToken,
            NodeConverter.ToIdentifier(otherKeywordToken),
            parent)
    {
    }
}


public static partial class NodeFactory
{
    public static MetadataOther CreateMetadataOther(SyntaxNode? parent, SyntaxToken otherKeywordToken)
    {
        Debug.Assert(otherKeywordToken.IsNode(SyntaxKinds.OtherKeywordToken));
        return new MetadataOther(otherKeywordToken, parent);
    }
}